package com.itheima.d6_singleInstance;

/*
    目标：掌握懒汉式单例的写法。
    懒汉式
 */


public class Test2 {
    public static String s1="ggg";
    public int s2;
    private String s3="ggg";
    public static Test2 t=new Test2();

    private Test2(){

    }
    static{
        System.out.println("构造类");
    }
    public static Test2 getKing(){
        return t;
    }
}
